There are many instances in which it is desirable to detect a data pattern within a set of data. The data is stored in memory, such as system memory in a computer system, where the data pattern is a string of characters. Such instances of data pattern detection arise in search and replacement of strings in word processing applications, null character detection in a character string, locating a macro block within a pixel image frame for computer vision applications, and facial recognition based on various metrics, to name just a few examples.
Typically, a central processing unit is used to load characters from memory into various registers and then compare the characters one by one with the character string for which pattern detection is to be performed. This process slows down the central processing unit and the system memory.